In , the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end communication services for applications. It can provide services such as connection-oriented communication, reliability, flow control, and multiplexing.
The details of implementation and semantics of the transport layer of the Internet protocol suite,, which is the foundation of the Internet, and the OSI model of general networking are different. The protocols in use today in this layer for the Internet all originated in the development of TCP/IP. In the OSI model, the transport layer is often referred to as Layer 4, or L4, while numbered layers are not used in TCP/IP.
The best-known transport protocol of the Internet protocol suite is the Transmission Control Protocol (TCP). It is used for connection-oriented transmissions, whereas the connectionless User Datagram Protocol (UDP) is used for simpler messaging transmissions. TCP is the more complex protocol, due to its stateful design, incorporating reliable transmission and data stream services. Together, TCP and UDP comprise essentially all traffic on the Internet and are the only protocols implemented in every major operating system. Additional transport layer protocols that have been defined and implemented include the Datagram Congestion Control Protocol (DCCP) and the Stream Control Transmission Protocol (SCTP).
Some transport layer protocols, for example TCP, but not UDP, support , i.e., provide connection-oriented communication over an underlying packet-oriented datagram network. A byte stream is delivered while hiding the packet mode communication for the application processes. This involves connection establishment, dividing of the data stream into packets called segments, segment numbering and reordering of out-of-order data.
Finally, some transport layer protocols, for example TCP, but not UDP, provide end-to-end reliable communication, i.e., error recovery by means of error detecting code and automatic repeat request (ARQ) protocol. The ARQ protocol also provides flow control, which may be combined with congestion avoidance.
UDP is a very simple protocol and does not provide virtual circuits, nor reliable communication, delegating these functions to the application program. UDP packets are called , rather than segments.
TCP is used for many protocols, including HTTP web browsing and email transfer. UDP may be used for and broadcasting, since retransmissions are not possible to a large number of hosts. UDP typically gives higher throughput and shorter latency and is therefore often used for real-time multimedia communication, where packet loss occasionally can be accepted, for example, IP-TV and IP-telephony, and for online computer games.
Many non-IP-based networks, such as X.25, Frame Relay and ATM, implement connection-oriented communication at the network or data link layer rather than the transport layer. In X.25, in telephone network modems and in wireless communication systems, reliable node-to-node communication is implemented at lower protocol layers.
The OSI connection-mode transport layer protocol specification defines five classes of transport protocols: TP0, providing the least error recovery, to TP4, which is designed for less reliable networks.
Due to protocol ossification, TCP and UDP are the only widely used transport protocols on the Internet. To avoid middlebox intolerance, new transport protocols may mimic the wire image of a tolerated protocol, or be encapsulated in UDP, accepting some overhead (e.g., due to outer checksums made redundant by inner integrity checks). QUIC takes the latter approach, rebuilding reliable stream transport on top of UDP.
| Packet header size | 8 bytes | 8 bytes | 20–60 bytes | 50–90 bytes | 12 bytes | 12 or 16 bytes | 14+ bytes |
| Typical data-packet overhead | 8 bytes | 8 bytes | 20 bytes | ?? bytes | 44–48+ bytes | 12 or 16 bytes | 14 bytes |
| Transport-layer packet entity | Datagram | Datagram | Segment | Segment | Datagram | Datagram | Datagram |
| Connection-oriented | |||||||
| Reliable transport | |||||||
| Unreliable transport | |||||||
| Preserve message boundary | |||||||
| Delivery | Unordered | Unordered | Ordered | Ordered | Ordered / Unordered | Unordered | Unordered |
| Data checksum | |||||||
| Checksum size | 16 bits | 16 bits | 16 bits | 16 bits | 32 bits | 16 bits | 16 bits |
| Partial checksum | |||||||
| Path MTU | |||||||
| Flow control | |||||||
| Congestion control | |||||||
| Explicit Congestion Notification | |||||||
| Multiple streams | |||||||
| Multi-homing | |||||||
| Bundling / Nagle |
| Connection-oriented network | |||||
| Connectionless network | |||||
| Concatenation and separation | |||||
| Segmentation and reassembly | |||||
| Error recovery | |||||
| Reinitiate connection (if an excessive number of PDUs are unacknowledged) | |||||
| Multiplexing and demultiplexing over a single virtual circuit | |||||
| Explicit flow control | |||||
| Retransmission on timeout | |||||
| Reliable Transport Service |
There is also a connectionless transport protocol, specified by ISO/IEC 8602/ITU-T Recommendation X.234.
|
|